package environment

import (
    "git.inspur.com/x/keycloak"
    rbacv1 "k8s.io/api/rbac/v1"
)

type k8cEnv struct {
}

func (c *k8cEnv) GetRBACSubject(username string) rbacv1.Subject {
    subject := rbacv1.Subject{
        Kind: "User",
        Name: keycloak.Client.ClaimName(username),
    }
    return subject
}

func (c *k8cEnv) CreateUserRBACSubject(name string) error {
    return nil
}

func (c *k8cEnv) ExtractToken(authToken string) string {
    return authToken
}
